<?php

namespace app\admin\model;

use think\facade\Request;
use think\Model;
use think\facade\Db;
use app\admin\model\AdminTry;

/**
 * @author:崔彦雷
 * @time:2022/10/20 下午 4:57
 * Class Admin
 * @property int id
 * @property string username
 * @property string password
 * @property string realname
 * @property string id_card
 * @property string mobile
 * @property int sex
 * @property string birthday
 * @property string avatar
 * @property string email
 * @property int organization_id
 * @property string job
 * @property string join_time
 * @property int native
 * @property string native_text
 * @property string major
 * @property string describe
 * @property string salt
 * @property int is_super
 * @property int identity
 * @property int status
 * @property int role_id
 * @property string last_login_ip
 * @property string last_login_time
 * @property string add_time
 * @property string update_time
 * @package app\admin\model
 */
class Admin extends Model {

    protected $table = 'admin';
    protected $pk = 'id';

    const  STATUS_1 = 1;



    /**关联查询手机号；
     * @fun:
     *
     * @return \think\model\relation\HasMany
     * @author:崔彦雷
     * @time:2022/10/21 下午 5:02
     */
    public function mobiles(){
        return $this->hasMany(Mobile::class,'table_id','id');
    }

}
